﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Script.Serialization;
using Easy.Operation;


namespace Easy.Web.Service.Entity
{
    /// <summary>
    /// GetGlobalPicklist 的摘要说明
    /// </summary>
    public class GetGlobalPicklist : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            string GlobalOptionId = context.Request["GlobalOptionId"];
            if (GlobalOptionId == null)
            {
                List<GlobalPicklistClass> list = EntitySetting_Function.GetGlobalPicklist();
                context.Response.Write(list.ToJson());
            }
            else
            {
                GlobalPicklistClass list = EntitySetting_Function.GetGlobalPicklist(GlobalOptionId);
                context.Response.Write(list.ToJson());
            }



        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}